package com.zr.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zr.dao.CarDao;
import com.zr.dao.SelectOrdersDao;
import com.zr.service.SelectOrdersService;
import net.sf.json.JSONObject;
@Service("selectOrdersService")
public class SelectOrdersServiceImpl implements SelectOrdersService{
	@Resource 
	private SelectOrdersDao selectOrdersDao;
	@Override
	public JSONObject findOrdersMsg(int page, int rows) {
		JSONObject  obj  = new JSONObject();
		obj.put("total", selectOrdersDao.findOrdersCount());
		obj.put("rows",selectOrdersDao.findOrdersMsg(page, rows));
		return obj;
	}
	@Override
	public JSONObject findCar(int page, int rows) {
		JSONObject  obj  = new JSONObject();
		obj.put("total", selectOrdersDao.findCarsCount());
		obj.put("rows",selectOrdersDao.findCars(page, rows));
		return obj;
	}

}
